import request from "@/utils/request";
// 获取所有小区信息
export function getParkingListApi(params) {
  return request({
    url: "/parking/index",
    params,
  });
}

// 搜索
export function SearchParkingApi(params) {
  return request({
    url: "/parking/index",
    params,
  });
}

// 新增
export const addParkingApi = (data) => {
  return request.post("/parking/index", data);
};

// 编辑 数据回显
export function getParkingDeatilApi(id) {
  return request({
    url: `/parking/index/` + id,
  });
}
// 修改
export function updataParking(data) {
  return request({
    url: `/parking/index/${data.id}`,
    method: "PUT",
    data,
  });
}

// 删除
// 传入id，删除
export function delParkingApi(id) {
  return request({
    url: `/parking/index/` + id,
    method: "DELETE",
  });
}
